package cn.wolfcode.wolf2w.business.config;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Exchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 浪兎兎
 * @since 2025-06-16 10:59
 */
@Configuration
public class StrategyConfig {
    @Bean
    public Queue strategyQueue() {
        return new Queue("strategyQueue", true, false, false, null);
    }
    @Bean
    public DirectExchange strategyDirectExchange() {
        return new DirectExchange("strategyExchange", true, false, null);
    }
    @Bean
    public Binding strategyBinding(Queue strategyQueue, Exchange strategyDirectExchange) {
        return new Binding("strategyQueue", Binding.DestinationType.QUEUE, strategyDirectExchange.getName(), "", null);
    }
}
